package xcmg.device.dao.mapper.sale;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xcmg.device.dao.entity.sale.SalesOutBillDO;
import xcmg.device.dao.entity.sale.SalesOutBillDetailDO;
import xcmg.device.service.vo.sale.SalesOutBillVO;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface SalesOutBillMapper {
    int deleteByPrimaryKey(String id);

    int insertSelective(SalesOutBillDO record);

    SalesOutBillDO selectByPrimaryKey(String id);

    SalesOutBillDO selectBySalesOutBillNo(@Param("salesOutBillNo") String salesOutBillNo);

    int updateByPrimaryKeySelective(SalesOutBillDO record);

    int checkStatus(@Param("salesBillOutNo") String salesBillOutNo);

    int checkOutStatus(@Param("id") String id);

    List<SalesOutBillDO> list(SalesOutBillVO salesOutBillVO);

    int updateStatus(@Param("salesOutBillNo") String salesOutBillNo, @Param("outboundStatus") Integer outboundStatus,
                     @Param("orgId") String orgId,@Param("date") Date date);

    List<SalesOutBillDO> availableReturnList(SalesOutBillVO salesOutBillVO);

    int deleteBySalesBillNo(@Param("salesBillNo") String salesBillNo);

    List<String> listPostIds(@Param("orgId") String orgId);

    int updateSaleStatus(@Param("salesOutBillNo") String salesOutBillNo, @Param("createSaleStatus") Integer createSaleStatus,
                     @Param("orgId") String orgId);

    int updateByOutBillNo(SalesOutBillDO record);

}